Copy Module DXL

Anybody have experience with the copy module DXL function? I am struggling with it for some reason.

bool copy(ModName_ modRef, string newName, string newDesc)

Thanks,
Corey
the@dmin - Fri Mar 26 15:48:09 EDT 2010

Re: Copy Module DXL
kbmurphy - Fri Mar 26 16:47:50 EDT 2010

Corey,

Be more specific in your question. What struggles are you having?

Re: Copy Module DXL
llandale - Sat Mar 27 15:43:47 EDT 2010

That command copies the specified module, making a new module in the same folder, with the specified name and description
 

string NameExistingMod = "/MyProject/MyFolder/MyExistingModule"
string NameNewModule = "MyNewModule"
ModName_ mnExisting = module (NameExistingMod)
 
if (!copy(mnExisting, NameNewModule, "New Description")
{  did not work
}

 


The outlinks of the existing module are also copied, but not any incoming links.

 

 

 

  • Louie

 

 

Re: Copy Module DXL
the@dmin - Tue Mar 30 16:07:18 EDT 2010

llandale - Sat Mar 27 15:43:47 EDT 2010

That command copies the specified module, making a new module in the same folder, with the specified name and description
 

string NameExistingMod = "/MyProject/MyFolder/MyExistingModule"
string NameNewModule = "MyNewModule"
ModName_ mnExisting = module (NameExistingMod)
 
if (!copy(mnExisting, NameNewModule, "New Description")
{  did not work
}

 


The outlinks of the existing module are also copied, but not any incoming links.

 

 

 

  • Louie

 

 

Thanks Louie! I was trying to be simple and didn't declare the strings outside of the function. I just got back into writing DXL, so I am a little rusty. Your explanation helped!

Corey